package cn.com.chengmandian.bike.service;

import cn.com.chengmandian.bike.dto.MemberAuthForm;
import cn.com.chengmandian.bike.dto.MemberInfoUpdateForm;
import cn.com.chengmandian.bike.model.EbMemberInfo;
import cn.com.chengmandian.core.web.pojo.AgentUser;
import com.baomidou.mybatisplus.extension.service.IService;

import java.math.BigDecimal;

/**
 * <p>
 * 电单车会员表 服务类
 * </p>
 *
 * @author AutoGenerator
 * @since 2021-12-08
 */
public interface IEbMemberInfoService extends IService<EbMemberInfo> {

    EbMemberInfo getByOpenId(String openid);

    EbMemberInfo getByPhone(String phone);

    void updateOpenId(Integer id, String openId);

    void updateAliPayUserId(Integer id, String aliPayUserId);

    EbMemberInfo createMember(Integer areaId, String phone, String openId, String aliPayUserId, String aliPayOpenId);

    String getToken(EbMemberInfo memberInfo);

    void updateInfo(Integer id, MemberInfoUpdateForm memberInfoUpdateForm);

    void memberAuth(Integer memberId, String name, String idCard, Integer isFace);

    void payDeposit(Integer memberId, BigDecimal money);

    EbMemberInfo getByAliPayUserId(String aliUserId);

    void checkOpenBike(AgentUser agentUser, Integer agentId, Integer areaId);

    void version(Integer id);

    void memberLogout(Integer id, String reason);

    boolean isExistThisIdCard(Integer memberId, String idCard);

    EbMemberInfo getByAliPayOpenId(String aliOpenId);

    void updateAliPayOpenId(Integer id, String aliPayOpenId);
}
